$(function() {
	$('#vue_vm_list div').hide();
});

var elderWallet = {
	elderWalletId: '',
	elderId: '',
	elderName: '',
	elderCarId: '',
	walletBalance: '',
	remindStatus: '',
	createTime: '',
	updateTime: '',
	createId: getLoginedUser()? getLoginedUser().staffId: '',
	updateId: getLoginedUser()? getLoginedUser().staffId: '',
	userRfidCardId: '',
};

var view = {
	data: elderWallet
};

function recharge() {
	var elderWalletId = $('#elderWalletId').val();
	var money = parseFloat($('#money').val());
	
	if(!elderWalletId || elderWalletId=='') {
		alert('请选择长者钱包');
		return;
	}
	
	if(!money || money==0) {
		alert('请输入充值金额');
		return;
	}
	
	if(confirm('确定充值' + money + '元吗？')) {
		save_basic_by_json(path+'/elderWallet/recharge', {id:elderWalletId, money:money, updateId:view.data.updateId}, function(response) {
			alert('充值成功');
			document.location.href = '3-5-1moneyadd-1.html?pageParam='+encodeURIComponent(JSON.stringify(response.data[0]));
		});
	}
}

function deleteBatch() {
	deleteBatch_basic(path+'/elderWallet/deleteBatch');
}
